import { Module } from '@nestjs/common';
import { APP_FILTER } from '@nestjs/core';
import { TypeOrmModule } from '@nestjs/typeorm';
import { CUserHistoryEntity } from '../user/entities/user-history.entity';
import { CUserEntity } from '../user/entities/user.entity';
import { HistoryController } from './history.controller';
import { HistoryExceptionFilter } from './history-exception.filter';
import { HistoryService } from './history.service';
import { TestController } from './test.controller';

@Module({
  imports: [
    TypeOrmModule.forFeature([CUserHistoryEntity, CUserEntity]),
  ],
  controllers: [HistoryController, TestController],
  providers: [
    HistoryService,
    {
      provide: APP_FILTER,
      useClass: HistoryExceptionFilter,
    }
  ],
})
export class HistoryModule {} 